<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
        <title>tooltipster插件使用-自定义提示框的外观</title>
        <link rel="stylesheet" href="css/tooltipster.bundle.css" />
        <style>
        /* This is how you would create a custom secondary theme on top of tooltipster-noir: */

        .tooltipster-sidetip.tooltipster-noir.tooltipster-noir-customized .tooltipster-box {
            background: grey;
            border: 3px solid red;
            border-radius: 6px;
            box-shadow: 5px 5px 2px 0 rgba(0,0,0,0.4);
        }

        .tooltipster-sidetip.tooltipster-noir.tooltipster-noir-customized .tooltipster-content {
            color: blue;
            padding: 8px;
        }
        </style>
    </head>
    <body>
        <span id="example" class="tooltip" title="This is my span's tooltip message!">打开提示框，关闭提示框的方法</span>
        <button id="clickTest">惦记我</button>
        <div id="clickResult" style="display:none;">你点击了我</div>
        <script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
        <!-- <script src="../fastclick/fastclick.min.js"></script> -->
        <script src="../fastclick/fastclick.js"></script>
        <script src="js/tooltipster.bundle.min.js"></script>
        <script>
        $(document).ready(function() {
            FastClick.attach(document.body);//报错
            // var attachFastClick = Origami.fastclick;//使用fastclick.min.js
            // attachFastClick(document.body);
            $("#clickTest").click(function(){
                $("#clickResult").toggle();
            })
           $('.tooltip').tooltipster({
               theme: ['tooltipster-noir', 'tooltipster-noir-customized']
               // trigger: 'hover',
           });
           $('#example').tooltipster('content','my new tooltip content');
           // var instance=$(".tooltip").tooltipster();
           // instance.content("修改instance的提示框的content");//报错
        });
        </script>
    </body>
</html>